package com.yilu.driver.entity;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * 成绩登记学员
 *
 * @author Administrator
 * @date 2017/4/15 0015
 */
public class RegisteredTraineeResponse implements Parcelable {

    /**
     * draw : null
     * recordsTotal : 0
     * recordsFiltered : 0
     * data : [{"id":"39","archivesNumber":"5007wy818","coach":"寒冬","name":"学员11号","mobile":"15696161355"}]
     */

    private Object draw;
    private int recordsTotal;
    private int recordsFiltered;
    private List<DataBean> data;

    protected RegisteredTraineeResponse(Parcel in) {
        recordsTotal = in.readInt();
        recordsFiltered = in.readInt();
    }

    public static final Creator<RegisteredTraineeResponse> CREATOR = new Creator<RegisteredTraineeResponse>() {
        @Override
        public RegisteredTraineeResponse createFromParcel(Parcel in) {
            return new RegisteredTraineeResponse(in);
        }

        @Override
        public RegisteredTraineeResponse[] newArray(int size) {
            return new RegisteredTraineeResponse[size];
        }
    };

    public Object getDraw() {
        return draw;
    }

    public void setDraw(Object draw) {
        this.draw = draw;
    }

    public int getRecordsTotal() {
        return recordsTotal;
    }

    public void setRecordsTotal(int recordsTotal) {
        this.recordsTotal = recordsTotal;
    }

    public int getRecordsFiltered() {
        return recordsFiltered;
    }

    public void setRecordsFiltered(int recordsFiltered) {
        this.recordsFiltered = recordsFiltered;
    }

    public List<DataBean> getData() {
        return data;
    }

    public void setData(List<DataBean> data) {
        this.data = data;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeInt(recordsTotal);
        parcel.writeInt(recordsFiltered);
    }

    public static class DataBean implements Parcelable {
        /**
         * id : 39
         * archivesNumber : 5007wy818
         * coach : 寒冬
         * name : 学员11号
         * mobile : 15696161355
         */

        private Integer id;
        private String archivesNumber;
        private String coach;
        private String name;
        private String mobile;
        private boolean checks;

        public boolean isChecks() {
            return checks;
        }

        public void setChecks(boolean checks) {
            this.checks = checks;
        }

        protected DataBean(Parcel in) {
            id = in.readInt();
            archivesNumber = in.readString();
            coach = in.readString();
            name = in.readString();
            mobile = in.readString();
        }

        public static final Creator<DataBean> CREATOR = new Creator<DataBean>() {
            @Override
            public DataBean createFromParcel(Parcel in) {
                return new DataBean(in);
            }

            @Override
            public DataBean[] newArray(int size) {
                return new DataBean[size];
            }
        };

        public Integer getId() {
            return id;
        }

        public void setId(Integer id) {
            this.id = id;
        }

        public String getArchivesNumber() {
            return archivesNumber;
        }

        public void setArchivesNumber(String archivesNumber) {
            this.archivesNumber = archivesNumber;
        }

        public String getCoach() {
            return coach;
        }

        public void setCoach(String coach) {
            this.coach = coach;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getMobile() {
            return mobile;
        }

        public void setMobile(String mobile) {
            this.mobile = mobile;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel parcel, int i) {
            parcel.writeInt(id);
            parcel.writeString(archivesNumber);
            parcel.writeString(coach);
            parcel.writeString(name);
            parcel.writeString(mobile);
        }
    }
}
